import request from '@/utils/request'

// 查询用户-消息状态列表 (分页)
export function selectPageSysUserMessage(query) {
  return request({
    url: '/system/sysUserMessage/selectPage',
    method: 'get',
    params: query
  })
}

// 查询用户-消息状态列表 (不分页)
export function listSysUserMessage(query) {
  return request({
    url: '/system/sysUserMessage/list',
    method: 'get',
    params: query
  })
}

// 查询用户-消息状态列表首页 (不分页)
export function listSysUserMessageMap(query) {
  return request({
    url: '/system/sysUserMessage/listSysUserMessageMap',
    method: 'get',
    params: query
  })
}

// 修改为已读
export function readOk(query) {
  return request({
    url: '/system/sysUserMessage/readOk',
    method: 'get',
    params: query
  })
}

// 查询用户-消息状态详细
export function getSysUserMessage(sysUserMessageId) {
  return request({
    url: '/system/sysUserMessage/' + sysUserMessageId,
    method: 'get'
  })
}

// 新增用户-消息状态
export function addSysUserMessage(data) {
  return request({
    url: '/system/sysUserMessage',
    method: 'post',
    data: data
  })
}

// 修改用户-消息状态
export function updateSysUserMessage(data) {
  return request({
    url: '/system/sysUserMessage',
    method: 'put',
    data: data
  })
}

// 删除用户-消息状态
export function delSysUserMessage(sysUserMessageId) {
  return request({
    url: '/system/sysUserMessage/' + sysUserMessageId,
    method: 'delete'
  })
}
